.theme__dark {
  .image-upload {
    background: $dark-theme-gray-darker;
    border: 1px solid $dark-theme-gray-light;
    color: $dark-theme-gray-lighter;

    &__action {
      &-background {
        background: rgba($dark-theme-black, 0.7);
      }

      button {
        color: $dark-theme-gray-lightest;

        .mdi {
          color: $dark-theme-gray-lightest;
        }
      }
    }
  }

  .image-upload-wrapper .mdi {
    color: $dark-theme-gray-light;
  }
}

.image-upload {
  background: $theme-gray-lightest;
  border: 1px solid $theme-gray-lighter;
  border-radius: $theme-border-radius-small;
  height: 140px;
  margin-top: 5px;
  overflow: hidden;
  position: relative;
  width: 140px;

  &__preview,
  &__action {
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
  }

  &__preview {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 3px;
    z-index: 1;
  }

  &__action {
    display: flex;
    justify-content: center;
    opacity: 0;
    position: relative;
    @media (prefers-reduced-motion: no-preference) {
      transition: opacity 0.5s;
    }
    z-index: 10;

    &-background {
      background: rgba($theme-gray, 0.7);
      bottom: 0;
      left: 0;
      position: absolute;
      right: 0;
      top: 0;
      z-index: 10;
    }

    button {
      color: #fff;
      position: relative;
      z-index: 100;

      .mdi {
        color: #fff;
      }
    }
  }

  &__dropzone {
    align-items: center;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px;
    text-align: center;
  }

  &__dropzone,
  button {
    .mdi {
      margin-bottom: 5px;
    }

    p {
      font-size: 10px;
      line-height: 10px;
    }
  }

  &:hover .image-upload__action {
    opacity: 1;
  }
}

.image-upload-wrapper .mdi {
  color: $theme-gray-light;
  font-size: 40px;
}

.image-upload-wrapper__file-size {
  display: flex;
  color: $theme-gray-light;
  font-size: 10px;
  margin-top: 3px;
}

.image-upload-wrapper__file-size-error {
  display: flex;
  color: $theme-brand-danger;
  font-size: 12px;
  margin-top: 10px;
}
